package com.serviceprovider.business.module.report.valueobjects;

//~--- JDK imports ------------------------------------------------------------

import java.util.Date;

public class ReportGenerationCriteria {
    private Date    dateFrom   = new Date();
    private Date    dateTo     = new Date();
    private String  reportType = "Self Fee Report";
    private String  loginUserEmail;
    private Integer orderStatus;
    private Object  payees;
    private Integer provider;
    private Integer providerId;
    String[]        selectedFee;
    private boolean showPayee1Column;
    private boolean showPayee2Column;
    private boolean showPayee3Column;
    private boolean showPayee4Column;
    private boolean showSelfFeeColumn;

    public ReportGenerationCriteria() {}

    public ReportGenerationCriteria(Integer providerId, Date dateFrom, Date dateTo, Integer orderStatus) {
        this.providerId  = providerId;
        this.dateFrom    = dateFrom;
        this.dateTo      = dateTo;
        this.orderStatus = orderStatus;
    }

    public String[] getSelectedFee() {
        return selectedFee;
    }

    public void setSelectedFee(String[] selectedFee) {
        this.selectedFee = selectedFee;
    }

    public Date getDateFrom() {
        return dateFrom;
    }

    public void setDateFrom(Date dateFrom) {
        this.dateFrom = dateFrom;
    }

    public Date getDateTo() {
        return dateTo;
    }

    public void setDateTo(Date dateTo) {
        this.dateTo = dateTo;
    }

    public Integer getStatus() {
        return orderStatus;
    }

    public void setStatus(Integer statusEnum) {
        this.orderStatus = statusEnum;
    }

    public Integer getProviderId() {
        return providerId;
    }

    public void setProviderId(Integer providerId) {
        this.providerId = providerId;
    }

    public void setReportType(String type) {
        reportType = type;
    }

    public String getReportType() {
        return reportType;
    }

    public void setShowSelfFeeColumn(boolean visible) {
        showSelfFeeColumn = visible;
    }

    public boolean getShowSelfFeeColumn() {
        return showSelfFeeColumn;
    }

    public void setShowPayee1Column(boolean visible) {
        showPayee1Column = visible;
    }

    public boolean getShowPayee1Column() {
        return showPayee1Column;
    }

    public void setShowPayee2Column(boolean visible) {
        showPayee2Column = visible;
    }

    public boolean getShowPayee2Column() {
        return showPayee2Column;
    }

    public void setShowPayee3Column(boolean visible) {
        showPayee3Column = visible;
    }

    public boolean getShowPayee3Column() {
        return showPayee3Column;
    }

    public void setShowPayee4Column(boolean visible) {
        showPayee4Column = visible;
    }

    public boolean getShowPayee4Column() {
        return showPayee4Column;
    }

    public void setLoginUserEmail(String email) {
        loginUserEmail = email;
    }

    public String getLoginUserEmail() {
        return loginUserEmail;
    }

    public void setPayees(Object payeeValues) {
        payees = payeeValues;
    }

    public Object getPayees() {
        return payees;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }

        if ((o == null) || (getClass() != o.getClass())) {
            return false;
        }

        ReportGenerationCriteria that = (ReportGenerationCriteria) o;

        if ((dateFrom != null)
            ? !dateFrom.equals(that.dateFrom)
            : that.dateFrom != null) {
            return false;
        }

        if ((dateTo != null)
            ? !dateTo.equals(that.dateTo)
            : that.dateTo != null) {
            return false;
        }

        if ((providerId != null)
            ? !providerId.equals(that.providerId)
            : that.providerId != null) {
            return false;
        }

        if (orderStatus != that.orderStatus) {
            return false;
        }

        return true;
    }

    @Override
    public int hashCode() {
        int result = (providerId != null)
                     ? providerId.hashCode()
                     : 0;

        result = 31 * result + ((dateFrom != null)
                                ? dateFrom.hashCode()
                                : 0);
        result = 31 * result + ((dateTo != null)
                                ? dateTo.hashCode()
                                : 0);
        result = 31 * result + ((orderStatus != null)
                                ? orderStatus.hashCode()
                                : 0);

        return result;
    }
}



